/* 现代化玻璃态登录界面样式 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 500;
    line-height: 1.6;
    color: #34495E;
    overflow-x: hidden;
}

/* 背景渐变和纹理 */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 50%, #e8f5e8 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* 叶子纹理背景 */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(46, 204, 113, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(39, 174, 96, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(22, 160, 133, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* 动态粒子效果 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(46, 204, 113, 0.3);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 0.5s; }
.particle:nth-child(8) { left: 80%; animation-delay: 1.5s; }
.particle:nth-child(9) { left: 90%; animation-delay: 2.5s; }

@keyframes float {
    0%, 100% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* 主登录卡片 */
.login-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 10;
}

/* 顶部光源效果 */
.login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.1));
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-card:hover::before {
    opacity: 1;
}

/* Logo和标题区域 */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.logo-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255,255,255,0.7);
    box-shadow: 0 4px 16px rgba(46,204,113,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    border: 1.5px solid #e0f5e9;
    backdrop-filter: blur(6px);
}
.logo-box img {
    width: 36px;
    height: 36px;
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    color: #34495E;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 16px;
    color: #7F8C8D;
    font-weight: 400;
}

/* 输入框容器 */
.input-group {
    margin-bottom: 24px;
    position: relative;
}

.input-field {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(46, 204, 113, 0.1);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #34495E;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: var(--input-height);
    padding-right: 52px;
    line-height: normal;
    text-overflow: ellipsis;
}

.input-field:focus {
    outline: none;
    border-color: #2ECC71;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
    transform: translateY(-2px);
}

.input-field::placeholder {
    color: #95A5A6;
    font-weight: 400;
}

/* 输入框底部动画线条 */
.input-field:focus + .input-line {
    transform: scaleX(1);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #2ECC71, #27AE60);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 1px;
}

/* 密码输入框特殊样式 */
.password-wrapper {
    position: relative;
}

.password-wrapper .input-field {
    padding-right: 48px;
}

/* 密码图标按钮样式 */
.toggle-password {
    position: absolute;
    top: calc(50% - 2px);
    right: 8px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 2;
}

.toggle-password:hover {
    background: rgba(46, 204, 113, 0.1);
}

.toggle-password:active {
    background: rgba(46, 204, 113, 0.2);
    transform: translateY(-50%) scale(0.95);
}

/* 密码图标样式 */
.password-icon {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

/* 密码输入框焦点时的图标样式 */
.password-wrapper .input-field:focus + .toggle-password {
    background: rgba(46, 204, 113, 0.1);
}

/* 优化后的玻璃态复选框样式 */
.privacy-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.privacy-checkbox input {
    opacity: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    position: absolute;
    left: 0; top: 0;
    z-index: 2;
    cursor: pointer;
}
.checkmark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #2ecc71;
    background: rgba(255,255,255,0.7);
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.privacy-checkbox input:checked ~ .checkmark {
    background: #2ecc71;
    border-color: #2ecc71;
}
.checkmark svg {
    display: none;
    width: 14px;
    height: 14px;
}
.privacy-checkbox input:checked ~ .checkmark svg {
    display: block;
    animation: checkmarkIn 0.2s;
}
@keyframes checkmarkIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 保持原有布局和间距 */
.privacy-section {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    padding: 16px;
    background: rgba(46, 204, 113, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(46, 204, 113, 0.1);
}

.privacy-text {
    font-size: 14px;
    color: #34495E;
    line-height: 1.5;
}

.privacy-link {
    color: #16A085;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.privacy-link:hover {
    opacity: 1;
}

/* 登录按钮 */
.login-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #27AE60 0%, #2ECC71 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
    position: relative;
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(39, 174, 96, 0.4);
}

.login-button:hover::before {
    left: 100%;
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

/* 底部链接 */
.bottom-links {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(46, 204, 113, 0.1);
}

.bottom-link {
    color: #16A085;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.bottom-link:hover {
    opacity: 1;
    background: rgba(22, 160, 133, 0.1);
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        margin: 20px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .input-field {
        padding: 14px 16px;
    }
    
    .bottom-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    /* 移动端密码图标优化 */
    .toggle-password {
        width: 28px;
        height: 28px;
        right: 6px;
        top: calc(50% - 1px);
    }
    
    .password-icon {
        font-size: 16px;
    }
    
    .password-wrapper .input-field {
        padding-right: 42px;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: more) {
    .password-icon {
        color: #000;
    }
    
    .toggle-password:hover {
        background: rgba(0, 0, 0, 0.1);
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .toggle-password,
    .password-icon {
        transition: none;
    }
}

/* 确保图标在触摸设备上的可用性 */
@media (hover: none) and (pointer: coarse) {
    .toggle-password {
        min-height: 32px;
        min-width: 32px;
    }
    
    .toggle-password:hover {
        background: none;
    }
    
    .toggle-password:active {
        background: rgba(46, 204, 113, 0.2);
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误状态 */
.input-field.error {
    border-color: #E74C3C;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.error-message {
    color: #E74C3C;
    font-size: 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
}

.error-message::before {
    content: '⚠';
    margin-right: 6px;
}

/* 成功状态 */
.input-field.success {
    border-color: #2ECC71;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

/* 隐藏原始mui样式 */
.mui-bar-nav,
.mui-content-padded {
    display: none !important;
} 